package com.lantosec.hmrp.modules.system.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.system.vo.SysSmsTemplateVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 短信模板配置表(待定) 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysSmsTemplate extends BaseEntity<SysSmsTemplateVO> {

    private static final long serialVersionUID = 1L;
    public SysSmsTemplate(SysSmsTemplateVO vo){
        this.smsTemplateId = vo.getSmsTemplateId();
        this.moduleId = vo.getModuleId();
        this.smsTemplateContent = vo.getSmsTemplateContent();
    }

    @Override
    public SysSmsTemplateVO convertToVO(){
        return new SysSmsTemplateVO(this);
    }


    /**
     * 短信模板ID
     */
    @TableId(value = "sms_template_id", type = IdType.ASSIGN_UUID)
    private Integer smsTemplateId;

    /**
     * 功能模块ID
     */
    private String moduleId;

    /**
     * 短信模板内容
     */
    private String smsTemplateContent;


    public enum ColName {
        sms_template_id, module_id, sms_template_content, 
    }
}
